# 硬转
class Solution:
    def addInList(self , head1 , head2 ):
        # write code here
        if not head1:
            return head2
        if not head2:
            return head1
        list1 = head1
        list2 = head2
        string1, string2 = '',''
        for i in list1:
            string1 += str(i)
        for i in list2:
            string2 += str(i)
        resInt = int(string1)+int(string2)
        resList=[]
        for i in str(resInt):
            resList.append(int(i))
        print('resList',resList)
        res = {}
        for i in range(len(resList)):
            res[i] = resList[i]
        # 返回的是一个字典
        # 需要返回一个只有值的{}所以不可以哦
        return res
head1,head2 = [5,9,7,5,7,1,2,6,4,2,7,8,9,6,1,6,6,1,1,4,2,9,5,5,0,4,6,3,0,4,3,5,6,7,0,5,5,4,4,0],[1,3,2,5,0,6,0,2,1,4,3,9,3,0,9,9,0,3,1,6,5,7,8,6,2,3,8,5,0,9,7,9,4,5,9,9,4,9,3,6]
so = Solution()
res = so.addInList(head1,head2)
print(res)